package com.daka.dao;

import com.daka.entity.Welfare;
import com.daka.mybatis.SQLMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author beliveli on 2016/7/4/0004
 */
@Repository(value = "welfareMapper")
@SQLMapper
public interface WelfareMapper {

    Welfare selectById(Long id);

    List<Welfare> selectAll();

    List<Welfare> selectByPage(@Param("code") String code ,@Param("status") Integer status, @Param("name") String name, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    int selectCountByPage(@Param("code") String code ,@Param("status") Integer status, @Param("name") String name, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

    List<Welfare> selectByParam(@Param("code") String code, @Param("key") String key);

    int save(Welfare topic);

    int updateById(Welfare topic);
}
